from django.urls import path
from .views import *

urlpatterns = [

    # 前台首页
    path('', indexViews.index,name='myhome_index'),
    # 分类列表
    path('category/<int:cid>/',indexViews.category,name='myhome_category'),
    # 商品详情
    path('bookdetails/<int:bid>/',indexViews.bookdetails,name='myhome_bookdetails'),
    # 搜索结果
    path('search',indexViews.search,name='myhome_search'),


    # 注册
    path('register', loginViews.register,name='myhome_register'),
    # 验证手机号是否已经存在
    path('checkphone',loginViews.checkphone,name='myhome_checkphone'),

    # 登陆
    path('login', loginViews.login,name='myhome_login'),
    # 退出登陆
    path('logout', loginViews.logout,name='myhome_logout'),

    # 购物车
    path('cart/index',cartViews.cartindex,name='myhome_cartindex'),
    path('cart/add',cartViews.cartadd,name='myhome_cartadd'),
    path('cart/edit',cartViews.cartedit,name='myhome_cartedit'),
    path('cart/delete',cartViews.cartdelete,name='myhome_cartdelete'),

    # 订单
    path('order/confirm',orderViews.orderconfirm,name='myhome_orderconfirm'),
    path('order/create',orderViews.ordercreate,name='myhome_ordercreate'),
    path('order/pay/<int:orderid>',orderViews.orderpay,name='myhome_orderpay'),

    # 联系我们
    path('contact',loginViews.contact,name='myhome_contact'),



]